import {BaseEntity, BaseApi, Result, getApiUrl} from "@/api/BaseApi";
import {Request} from "@/api/Request";
import http from "@/api/axios";
import {SysMenu, SysMenuTree} from "@/api/sys/SysMenuApi";
import {sys_application_name} from "@/api/constant";


class SysApi {
    API_PREFIX = sys_application_name + '/SysApi';

    getUserInfo() {
        return new Request<Result<UserInfo>>().setHttp(() => http.get(getApiUrl(this.API_PREFIX, 'getUserInfo')));
    }
}

export default new SysApi();

export interface UserInfo {
    routeList?: SysMenu[];
    menuList?: SysMenuTree[];
}